/*
 * monster_list.h
 *
 *  Created on: 2013
 *      Author: Eddy Zogbo and Moncef Sbay
 */

#ifndef MONSTER_LIST_H_
#define MONSTER_LIST_H_

#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include <SDL_image.h>

#include "../include/constant.h"
#include "../include/player.h"
#include "../include/bomb.h"
#include "../include/monster.h"

//alias definition
typedef struct cell_M *t_cell_M;
typedef struct monster_list *t_monster_list;
typedef struct cell_M cell_M;
typedef struct monster_list monster_list;
typedef struct s_monster * t_monster;
typedef struct s_map* t_map;
typedef struct s_player * t_player;

// creates a new monster_list
extern t_monster_list monster_list_init(t_monster monster);

//add a new monster inside the monster_list
extern void list_add_M(t_monster_list monster_list,t_monster monster);

//get first and last cell of the monster_list
extern t_cell_M get_first_M(t_monster_list monster_list);
extern t_cell_M get_end_M(t_monster_list monster_list);

//Returns the monster of the cell
extern t_monster get_monster(t_cell_M cell_M);

//Returns the next and the previous cell
extern t_cell_M get_next_cell_M(t_cell_M cell_M);
extern t_cell_M get_previous_cell_M(t_cell_M cell_M);

//check if a monster of the list has been killed on (x,y)
extern void monster_list_kill(int x, int y, t_monster_list monster_list);

//delete a specific monster from the list
extern void monster_list_delete(t_monster_list monster_list, t_monster monster);

//display the monster in terms of map
extern void monster_list_from_map(t_monster_list monster_list, t_map map);

//delete from the list the monster that already been killed
extern void monster_list_update(t_monster_list monster_list);

//display every monster of the list
extern void monster_list_display(t_monster_list monster_list,t_map map,t_player player, SDL_Surface *screen);
#endif /* MONSTER_LIST_H_ */

